# == Schema Information
# Schema version: 20090415123829
#
# Table name: forums
#
#  id          :integer(4)      not null, primary key
#  name        :string(255)
#  description :text
#  position    :integer(4)
#  created_at  :datetime
#  updated_at  :datetime
#


class Forum < ActiveRecord::Base
  has_many :topics
  validates_presence_of :name,:description

  def before_save
    position = Forum.maximum(:position)+1
  end
end
